<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>实现左侧边栏固定，其他内容自适应</title>
    <style>
      #box {
        width: 100%;
        height: 400px;
        display: flex;
      }
      #left {
        width: 100px;
        height: 100%;
        background-color: lightgreen;
      }
      #right {
        flex: 1;
        background-color: lightblue;
      }

      #box2 {
        width: 500px;
        height: 500px;
        background-color: plum;
      }
    </style>
  </head>
  <body>
    <div id="box">
      <div id="left"></div>
      <div id="right"></div>
    </div>
    <div id="box2"></div>
  </body>
</html>
